import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'goods_detail_logic.dart';

class GoodsDetailsPage extends StatelessWidget {
  const GoodsDetailsPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final logic = Get.find<GoodsDetailLogic>();

    return Scaffold(
      body: Stack(
        children: [
          Container(
            // margin: EdgeInsets.only(bottom: 65),
            child: ListView(
              children: [
                Container(
                  width: 375,
                  height: 375,
                  color: Colors.white,
                  child: Text('111'),
                ),
                Container(
                  margin: EdgeInsets.fromLTRB(10, 10, 10, 5),
                  padding: EdgeInsets.all(10),
                  width: 335,
                  height: 115,
                  decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(7.5),
                      color: Colors.white),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Row(
                        children: [
                          SizedBox(
                            height: 30,
                            child: Row(
                              crossAxisAlignment: CrossAxisAlignment.end,
                              children: const [
                                Text('￥',
                                    style: TextStyle(
                                        color: Colors.red, fontSize: 17)),
                                Text('1000',
                                    style: TextStyle(
                                        color: Colors.red, fontSize: 27)),
                                Text('.',
                                    style: TextStyle(
                                        color: Colors.red, fontSize: 12)),
                                Text('00',
                                    style: TextStyle(
                                        color: Colors.red, fontSize: 17))
                              ],
                            ),
                          ),
                          SizedBox(width: 14),
                          Container(
                            padding: EdgeInsets.fromLTRB(6, 2.5, 5.5, 2.5),
                            height: 18,
                            width: 95,
                            child: Text('赠1000基金积分',
                                style: TextStyle(
                                    color: Colors.white, fontSize: 11)),
                            decoration: BoxDecoration(
                                borderRadius: BorderRadius.circular(7.5),
                                color: Colors.lightBlueAccent),
                          )
                        ],
                      ),
                      SizedBox(height: 15),
                      Text('法国进口品牌女生经典款增亮唇色提升光泽低饱和度红棕色系描摹秋冬慵懒氛围口红',
                          style: TextStyle(
                              color: Colors.black,
                              fontSize: 15,
                              fontWeight: FontWeight.w600),
                          maxLines: 2),
                    ],
                  ),
                ),
                Container(
                  margin: EdgeInsets.fromLTRB(10, 5, 10, 5),
                  height: 335,
                  width: 335,
                  color: Color.fromARGB(234, 234, 233, 220),
                  child: Text('222'),
                ),
                // SizedBox(height: 10),
                Container(
                  margin: EdgeInsets.fromLTRB(10, 5, 10, 5),
                  height: 335,
                  width: 335,
                  color: Color.fromARGB(234, 234, 233, 220),
                  child: Text('333'),
                )
              ],
            ),
          ),
          Positioned(
              left: 15,
              top: 44,
              child: InkWell(
                onTap: () {
                  Get.back();
                },
                child: Container(
                  height: 29,
                  width: 29,
                  decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(150),
                      color: Colors.grey),
                  child: Image.asset("assets/images/arrow-left.png"),
                ),
              )),
          Positioned(
            bottom: 0,
            child: Container(
              width: 375,
              height: 55,
              color: Colors.white,
              child: Row(
                mainAxisAlignment: MainAxisAlignment.end,
                children: [
                  // Container(
                  //   margin: EdgeInsets.fromLTRB(15, 8.5, 5, 0),
                  //   height: 42,
                  //   width: 30,
                  //   child: Column(
                  //     children: [
                  //       Container(
                  //         height: 20,
                  //         width: 20,
                  //         child: Image.asset("assets/images/icon_add_cart.png"),
                  //       ),
                  //       SizedBox(height: 5.5),
                  //       Container(
                  //         child: Text('购物车',
                  //             style: TextStyle(
                  //               color: Colors.black,
                  //               fontSize: 9,
                  //             )),
                  //       )
                  //     ],
                  //   ),
                  // ),
                  // Container(
                  //   margin: EdgeInsets.fromLTRB(5, 9, 5, 9),
                  //   height: 37,
                  //   width: 145,
                  //   alignment: Alignment.center,
                  //   decoration: BoxDecoration(
                  //       borderRadius: BorderRadius.circular(45),
                  //       color: Colors.yellow),
                  //   child: const Text('加入购物车',
                  //       style: TextStyle(color: Colors.white, fontSize: 13)),
                  // ),
                  Container(
                    margin: EdgeInsets.fromLTRB(5, 9, 15, 10),
                    height: 37,
                    width: 145,
                    alignment: Alignment.center,
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(45),
                        color: Colors.lightBlueAccent),
                    child: const Text('立即购买',
                        style: TextStyle(color: Colors.white, fontSize: 13)),
                  )
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }
}
